﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

// Namespaces
using Controller;

namespace JuleProjekt
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        ValgmaskineController vcon;

        public MainWindow()
        {
            InitializeComponent();
            vcon = new ValgmaskineController();
            showPieChart();
        }

        private void btnAmt_Click(object sender, RoutedEventArgs e)
        {
            AmtsStorkreds amt = new AmtsStorkreds(vcon); // hvilken vindue den skal vise når man trykker på amt knappen. 
            amt.Show(); // skal vise / finder den frem
            this.Close();  // lukker nuværende vindue, mens den henter den anden          
        }

        private void showPieChart()
        {
            List<KeyValuePair<string, int>> valueList = new List<KeyValuePair<string, int>>();
            valueList.Add(new KeyValuePair<string, int>("Blå", 87));
            valueList.Add(new KeyValuePair<string, int>("Rød", 92));
            pieChart.DataContext = valueList;
        }
    }
}
